Input file handling