add clause for file exists