fix exit() in try except block of child_process()