support --return flag for executable