Transform command and arguments by toString to avoid ArrayStoreException