Added fsync() function