introduced @status = waiting at the start of execute so that the http request waits till output appears. Not doing it for get requests as get request can be controlled from the front-end
introduced 1 sec sleep in the thread listening at the output (stdout) so that it does not collect data pre-maturely