Though a consultant can prepare for factors which can cause project delay, a lot of situations may be unexpected.
How can you be prepared for the unexpected? To be frank, it's not possible to be 100 percent ready, but following proper process can help to be nearly there.
It's always better to have back-up plans if you expect something might go wrong. If you are doing something for the first time, do some research and study all the available sources. Let's take an example. Suppose you are connecting to a data source which you haven't worked on earlier. Try to get all the information about the same and also look in different forums to see what problem the users have faced. This will help you avoid mistakes which others have done and help you save on re-work.
Another example which may not be anticipated well is migration of source...