Better monitoring
Added a memory check