Added mkdirp
Refactored schemas, to support a simple constants that can be substituted for better maintainability
Add a little logging