added "or die"s and trying to fix background processes