check input stream