1. An image forming apparatus, comprising: a storage unit including unique information identify to an apparatus main unit; a setting unit including setting information of the apparatus main unit instead of the unique information; a pattern addition unit that adds an addition pattern based on a unique pattern generated from the unique information or a setting pattern generated from the setting information to image data that is input to the apparatus main unit; an image formation unit that forms a visual image of the image data and an addition image of the addition pattern which is hardly recognized by eyes on a recording medium; and a control unit that changes the addition pattern formed by the image formation unit from the unique pattern to the setting pattern when an error depending on the unique information occurs.