add settings as yaml and update error handle