added guards since view.file_name() seems to be None sometimes...