Refactoring deployment scanner to wait for first successfull deployment before start scanning