first pass - one file only
works for one file - skip using a bufio for writting - doesnt work on utf8?