Change some cout statements to go to err.log