[Export] Imporved functionality for exporting
Now exports can be done via single command and output file can also be specified.

Signed-off-by: Aniket Pant <me@aniketpant.com>