Exceptions are now caught and logged