This is probably what is causing the exception with:

java.io.IOException: Filesystem closed
        at org.apache.hadoop.hdfs.DFSClient.checkOpen(DFSClient.java:398)

In stop() it is closing the filesystem. That filesystem is cached and used throughout the process so you can't close it.