Fixed creation of directories without write_files true
Minor debugging