added kernel-messages recipe, fixed write-file() function