fix stdout truncate problem on windows
fix windows line endings
convert windows path separators