move main loop out of try/catch
fixed: crash on syntax error in preference ranking