Check if file exists before unlinking