Change RuntimeError in MemoryError