Fix Upload errors callback and code style