infrastructure for abstract file handling