function to check and fix the dirs struct
minor
saving/loading updates