Nitrofurantoin should be avoided at term (38-42 weeks) due to potential for hemolytic anemia in the newborn.