More user protection

Made sure that exceptions in users code are caught, so the program
doesn't hang and eat the port.