Moved common routines to FileLoader and made FileLoader abstract.