fixed a bug when file_names do not match the expected format