changed cerr to cout statement so it behaves better in scripts