preventing that a single corrupt file breaks the complete binning process
(cherry-picked from b25cef1)