Appears app.exec() is main is dead code. Could be cleaner exiting in there and just returning error state here.