fixed bug with the file writer, back up the redis database correctly