re-adding error logging on upload error

It was removed by mistake, so I'm re-adding it