Added new echo function and removed side effects from PrintMessage