lib/Shell: changed thread constructor to allow for failure