Make the program can accept argument &exit with logs if errors arise.

1.exit with logs if errors 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.