Moved to HttpKernel, added error listener