issues with missing file handling fixed