Filesystem: Fix NullPointerException issue