Fix file-mapping
Change tc-e/tc-err to take an implicit second parameter as an expected type.

TODO: return type checking