ensure that parent file has been created before writing log