Fixed logging in semaphore