Fix bad reference to stop_now, add more helpful error message on database errors