added mem.apps and improved error handling and debugging for charts.d