Line Counter and Dep management

Adding support for line counter
Improve handling of missing deps