Added functions to generate files