fixed stack overflow, char* log was being freed without being newed in some instances