fixed file nullpointer