fix file exists guard