support windows

change /dev/null to NUL if windows