added some logging to catch OOME