Working with functions and files