Log debug information
Avoid circular dependencies
Merge pull request #1 from ceshine/master

Debug information + circular dependencies avoidance