Fix error then selecting file from command line