bug fix log module cleaning when type is not file