Change debug file filemode
Improve handling of nested includes