undo parts of the latest change: not closing the readers in STDIN mode didn't help - instead, just throw an exception if profile mode is used with input from STDIN