Fixed #1199: Add optional parameters to cli.gather

Signed-off-by: Anton Kovalyov <anton@kovalyov.net>
Version 2.1.7