catch out of memory error