write splitted keys to output