Update to make it work on Windows

Fix INSTALL_DEPENDENCIES_HOME on Windows
When there is a security issue, drop security
Add asserts to help debugging
Add line number to exit_exception_handler