I don't believe you actually need to check if it exists. I think unlink will just return false if it doesn't exist. Please check the docs before you remove this though.