- improved error handling class, made it cleaner