added environment check for custom 404 constants definition in bootstrap
added environment check for custom 404 constants definition in bootstrap