Fix loading files in directories