Completed the save file to database feature