Made it deal with STDIN and STOUT