Add dynamic fsync (thanks faux123)