Fixes installation issue where the application was failing
to install. Added more checkings before rewrite application
config file
Merge branch 'hotfix/installer-error'