FIX: UnboundLocalError, undecleared nipype_mem