enhance logging ; make cleanup more robust ; cleanup