fixed problems with empty files