add function for open and save file