Fixed logging in Linux & Mac