Added fsync on/off support.

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

Change-Id: Ic20470987ef23410f1d0324f96f00578f7df8725