Added a file opening function to the scratch library file.