Added error fields to upload doc, view doc templates