Add a method for opening files.