Some cleaning up
Guard the log calls