also check memory usage
do not write out file