Changed echo to write to stdout.