NSAlert to NSLog for errors. Trial switch bug fixed