Modified main logic to take a filename from the cmdln.