Added fsync on/off support.

Signed-off-by: Francisco Franco <franciscofranco.1990@gmail.com>