Changed valid file check

from 'is_file' to 'is_uploaded_file'