Fix double-printing in the console from system out or system err