add logging for errors