Reduce explicit usage of fileref