implementing opening a file.