LEAF: Learning and Evaluation Augmented by Fact-Checking to Improve Factualness in Large Language Models