add function - isTemplate to Stream.php