Added guard for non-existing files
Added guard for empty content
Tests for the graph construction
Graph construction, quite ugly, need a refactor.