try to read input from terminal via piping