Add app-level error detection