Additional safeguard for missing libraries

Adds an additional check for if the libs directory is successfully
created. Missing template files will not cause assertion failures,
instead of causing NPEs eventually. Also some logging to discover file
issues.