Fix a bug,  when  the file was cleared