Clean up file check logic
Add missing do