bugfix: Close the Logging service properly
Make sure processing signals is thread-safe