Added essential error checking methods in HttpUpload. Also minor comment changes in other code.