Added 'write_nested_parents', 'trim_output'