Read the mode from the command line