made the print to stdout optional

Signed-off-by: Spyros Gasteratos <morfeas3000@gmail.com>