not using pwrite using write