Handle subprocess error