error handling: apps_total
cleaning
error handling