Modified file handling on the RM side. Created file saving and recovery on the TM side.