adding debugging to see why upload is failing