File creation and function creation