Replaced echo with printf calls to make color output working on OS X