Check filesize before running exif_imagetype
Make sure variables are defined