Added --finalize option to learner