deleting temp files and moving data to seperate file