Study of defect mechanisms in partly filled stamp cavities for thermal nanoimprint control