fix null openfile