fix exception ignored on subprocess call