added debug mode and yaml require fixes