Implemented while-loop logic in Runner service