add try catch block around main, this is to catch unhandled errors and print out its error messages to further investigation.