'error' event needed a function call