Updated for windows, creates .txt file.