files class to handle all files functionality