double file handling