Fixed logging for Mac