extracted extractFunctionInFile, fixed OffsetConverter