switch statement segfaulted, when there was no mode (action) or on the commandline.