Fix error while file exists.