Method for generating a single file, proper exception handling from core. Fixes #4. Addresses #11.