more debugging and implemented more of writeFile in fat.c