fix bug: add trimspace in readCommand