Read input from named pipe