Re-implmentation of out_file plugin for Fluentd