Changed arguments to fsync() function to break dependency on