[Console App] Make the program can accept argument and run without windows &fix bug made it exit with logs if errors arise.

1.fix the bug that exit without logs if errors arise, now it will stop the process when problems arise.
2.made the program can accept argument and run without windows. so that i can use some script to auto run the program and iterate.