Analysis on cracking in hard thin films on a soft substrate under Berkovich indentation