slightly cleaner/new funcitonality related to opening and saving files.