optimized lsof call