change the way the program works, takes two arguments now for input map and output file names and the command-line program now automatically closes