Moved file manipulation code into a separate class