Hi Thach,
There are two options for processing your command. If you want to process the command before processing or after processing. Based on this command will be executed after writing the file or before writing the file.
You can refer to point number 5, in the SAP Help link mentioned by you -
Defining OS Commands for Message Processing by SFTP Adapter - SAP Process Integration, secure
About your error log, can you post the screenshot of your channel configuration? Additionally you can refer to below Wiki for more info -
SAP XI File Adapter OS Command Line Feature - Process Integration - SCN Wiki
Regards,
Nitin