Better API
Adding lock to make sure that  we don't mutate the file header (on write page operation) while some else is syncing data file.