added method for write_keys_to_path in base plugin