implementing lseek and testing synchronization