David: looks like you made preferences loading dependent on gui mode, but this is wrong: we need preferences when running in commandline mode too.
David: looks like you made preferences loading dependent on gui mode, but this is wrong: we need preferences when running in commandline mode too.