Added interrupt to the thread, so that it will stop, when the app closes