write out errors