Factors influencing the quality of carbon coatings on LiFePO4