Fix #2299. Check commandline args before starting

atlas generating thread and GUI.