Add guard to memory_usage script