also writing km as str-file