cleanup: remove unreachable conditioned code and align some logging to common pattern in platform agent