As currently written, this causes an error because the directory has not been created. It should simply not generate the file if no docs for that type are found.