added write temp to file and deleted temp and record in user temp upload file
added check of offset