add waitForFinish(int timeout) at command/Command.java