improve error handling in install module on Windows