replaced custom extension stripping routine by sysutils version