supress optickle warnings about accessing internal state
if filename ends in .pdf, it will call dot automatically (both dot and pdf are generated).