added tail support for windows.