add extension for command;refactoring FileHelper