Added file functions

Warning this may now overwrite your files!