fixed fs_sync() so it properly persists to disk