Program to work with files and functions