change checkpointDir to lazy val