Thin film and substrate cracking under the influence of externally applied loads