correctly use the filename ad fallback in document title