Added er.stack to error callback