move getStateDir from ModelPlugin to ModelCore