Added functions to generate test and demo files.