first pass a file handling