A couple of fixes
Added validation to upload