added logging in isManaged check