writing sync will dramatically slow down this process