added writing output as ttl file