created loadFile method

loads file using filepath given by user input in file chooser