$this -> api -> plugin -> writeYAML($this -> path . "config.yml", $this -> config['Profile'][] = array($dat)); Yes, I know it's a mess. Can someone fix it so it can work?