Move setApplicationName() calls to happen at start of main()
Add logging TODO