add memory check script