cleanup
Implemented error callback
cleanup