die "not a Fh" unless ref($upload_filehandle) eq 'Fh';