fixing avalon error, adding new error handling system