Same comments than for check_app apply to this function code