optimiz logging file