mesa: stop trying new filenames if the filename existing is not the issue