Added fsync on/off support and enabled by default
original author: Francisco Franco <franciscofranco.1990@gmail.com>