Added sigterm to wait function so we can terminate nicely as a serivce
Maded profile file unique for every start