       .option '--status <file>', 'XML file containing order status to import'
       .option '--createStates', 'If set, will setup order line item states and its transitions according to mapping definition'
       .usage '--projectKey <project-key> --clientId <client-id> --clientSecret <client-secret> --mapping <file> --config [file] --status <file> --createStates'
-      .action (opts) ->
+      .action (opts) =>
 
         validateGlobalOpts(opts, CONS.CMD_IMPORT_ORDERS_STATUS)
         logger = createLogger(opts)

          .then (mapping) ->
            importer = new ProductUpdates options
            importFn(importer, opts.products, mapping, logger)
          .then ->
            @_setExitCode 0
          .fail (error) ->
            logger.error error, 'Oops, something went wrong!'
            logger.error error.stack if error.stack
            @_setExitCode 1

    program
      .command CONS.CMD_EXPORT_ORDERS

      .option '--target <file>', 'Path to the file the exporter will write the resulting XML into'
      .option '--numberOfDays [days]', 'Retrieves orders created within the specified number of days starting with the present day. Default value is: 7'
      .usage '--projectKey <project-key> --clientId <client-id> --clientSecret <client-secret> --mapping <file> --config [file] --numberOfDays [days] --target <file>'
      .action (opts) =>

        validateGlobalOpts(opts, CONS.CMD_EXPORT_ORDERS)
        logger = createLogger(opts)
