file null bug fix