Fix exception when application.mode is something else then DEV or PROD
[#1593]

[#1593] Don't default to dev mode : Make it a fatal error