additional logging on errors