Add stop script and improved log managment