Added a little bit of logging and an error page.