Fix undefined variable $filesystem