modified program to only read dependencies and output them to a file