fix issue when after build console close without waiting for keypress