Stops the listener thread once the hash has been found
Changed logging to a function instead of a thread, now logs properly.