catch OutOfMemoryError exceptions