Switch to UserException for pretty printing of errors