add rudimentary logging in case of lio_du failure
fix count comparisons by casting to int