Added stdin support