Hacky solution to catch exceptions in the main loop