Change file path handling from .nix to generic