Added an option to specify a log name.
Made Q reset properly on new runs.
Added an option to perform runs and store each run in separate logs.