Added method for writing to plugin files.