Replace cerr with LOG()