improven logs in windows
improve error handling