Add debug trace to uploading images