Use access(2) instead of stat(2) to test file existence.