updated tests
added error listener
added error listener