Move the config for after write hook to be specified in the general fluentd config, instead of as a constant in the script.