Change InputStream class name and minor fix in open function