Added format_key to write_redis