fixed warnings
re-added error code, and using int for read/write data size
migrating projects to FatFs 0.10c