A laser diode which can be easily assembled at low material cost is provided. The algorithm allocates a positive sign or negative sign to each of the pattern data, summation of the areas of the pattern data having positive signs while subtracting the areas of the pattern data having negative signs, for obtaining a minimum of the sum. The sensor device can include a distance detection device, and others. An electrically conductive, magnetic lead is formed over the pinned layer and AFM layer such that the lead fills a space between the AFM layer and the air bearing surface. The present invention includes a sump housing storing water therein, a pump coupled with the sump housing to pump the water, a guide assembly provided within the sump housing to guide the pumped water to a sprayer, and a drain chamber configured to filter contaminant from the water drained from the guide assembly. When an error occurs in the feeding of the following paper, the laser printer stops the conveyance of the preceding paper in the switchback mode.