Fixed issue in run.sh by implementing complete process handling in supervisor