Added filewriter plugin functionality