fix catch of subprocess error