resolve symlinks before opening file