Added handle Interupt and SIGTERM and added wait for process to finish after we've killed it