FileResource being used when should be NIOFileResource