Adding diagnostics posted to gist to debug out of memory

Try to output stderr in addition to stdout: fixing it?