Version with accessing files and printing its contents