Possibilities of Use of the Thermographic Measurement as a Tool for Detecting Defects and Improving the Production Process