key and subkey can print to a txt