finish scan file