Updated main function. Output file is not required.