fixed the modification issue, it now reads from /proc/pid/maps and works like a charm