working on writing local_best file