Added command-line arguments and option for output file path