remove custom exception classes and simplify built-in error handling, to avoid interfering with poll thread