Added writeKeyHepler