Added function to create KWE file.