adds subprocess's exitcode check
Signed-off-by: Sho Nakatani <lay.sakura@gmail.com>