Adding while loop to manage the arguments. Adding option to use another log file.