add log download , clean function