get debug from env
improve template access
try async fetch gist
correctly raise errors