Templates for error pages (404, 500)
Added some error handling and logging