Fixed header logging in case of execute error