handle scan file crash