implemented opening files from open file dialog