Update local_dir_state functions and added update_local_dir_state