add 500 and 404 pages on debug mode