fix crash on cleaning remained files