Effect of a cap layer on morphological stability of a strained epitaxial film