Added more debug messages to upload.lua