added documentatin on errors