added error page handler