fixed file handling for local links