Improve logs and stop applications after 5 restarts (over a period of 15 minutes)