Call file_digest properly for instance/class contexts