While there is no fail-safe against that, setting out a checklist will make you as prepared as possible.
First, don't use ICT for the sake of it. You need to ensure that using ICT is the best way for you to achieve your learning objectives and have a clear idea of what you are expecting to achieve through the use of ICT.
Also try to ensure that you cover a variety of tasks that take into account the range of abilities within your class. Extension activities for those that complete work successfully before others, can be a good inclusive approach.
Make sure everyone can achieve something. While we're on the subject of ability, check your pupils knowledge beforehand. Do they have the skills to use the CD-Rom, software or website effectively? And, if you're not totally confident about using ICT yourself, seek support.This can come from any number of sources, ranging from colleagues or fellow teachers (there are many teacher forums where other teachers will happily share their knowledge), to your own pupils.
Many pupils are confident ICT users and they'll enjoy taking the role of an expert, plus it raises their self-esteem. Always check that your ICT resources are available, including hardware, software and technical support. Do a dry run beforehand to make sure everything works as it should and don't leave anything to chance.
The internet can bring its own unique problems, so ensure you have good reason to go online. Make sure that all the computers will be connected when you need them. Are there enough computers? Decide whether you want children to be able to explore the web or whether you are going to simply issue a predefined set of links. Finally, if your school uses a web cache (a system which stores frequently used web pages and makes them load faster), then make sure you have already visited these pages and that they are stored in the cache - this will speed things up in your lesson. Most importantly, check any websites for content and suitability before you use them.
Finally, don't try to get too clever. There are teachers out there that have have already developed ICT content or strategies and discovered what works and what doesn't... use their knowledge. There are plenty of school websites, teacher websites and online communities where people are only too happy to share ideas. But don't forget to share some of your ideas in return.