Do not fsync if file descriptor is null