using readSyncfile and buffer