Take filename field into account, unless empty