Fixed file exists issue