error reporting finally working