Applying pull request #826 to feature/module
Fixing issue with paths and better logging