error fix and  add gitignore for state and datad