better WorkThread error handling and documentation