An ink jet printer has a carriage equipped with a recording head. The carriage is disposed downstream in a feeding direction of a recording medium. The carriage has an optical sensor for measuring dirt on a supply roller. When the supply roller is dirty, a cleaning operation is started to rotate the supply roller as being pressed onto a separation pad. The dirt on the supply roller is measured with the optical sensor, and the cleaning operation lasts until the dirt is removed from the supply roller.