Added more debug output. Working with paths correctly