updated logging to ensure log directory exists and to create file as needed