fixes log and raw_log creation