how to prevent bacterial infections