move check of whether we are looking at a windows file to more generic place