Code based healthcheck for applications