moved file mgmt functions into their own class