Improved logging for log errors to console instead of mail.
Add missing 404.html template.