loading files functionality