Add functions to compute P from F(with bugs)
fix
let the application run in console
make the program can accept arguments

make the program can run without windows if there are arguments pass to
the program .
minor modify
Merge pull request #2 from HaiyangXu/consoleApp

[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.