''i found an error with detecting card capacity over 4 GB. What shall i do to get it work?''
Fix the error!
A complex system that works is invariably found to have evolved from a simple system that worked. A complex system designed from scratch never works and cannot be patched up to make it work.