Tam anlamadım ama file_exists ile kontrol ettirebilirsin dosyanın varlığını.

if(file_exists($dosya)){ ..devam et.. }