Added sync functionality to file reads