Ensure the output directory is created prior to generating code.