fix listFiles Nullpointer