fixed two file conditions