As a contractual freelancer, you will (should) in one way or the other offer to some extend consulting services, unless explicitly stated otherwise.
Just as a medical doctor, after careful observations, you diagnose and prescribe (with likely further observations and adjustment based on your patient's physiological condition and response to treatment in order to achieve the true purpose of the medication, alienating all possible adverse effects from your decision ~ as an expert in your field) based on your knowledge and experience.
In that light, you will have not only exercised as a true professional but equally provided stun statutory cover grounds for any potential legal suite against you.
That said, your agreement should emphatically highlight that you do not take any direct/indirect responsibility for failed events resulting from action(s) contrary to your counsel, before, during and after (a conscious, possibly mutual and acceptable period, further guided by a legal frame and catering for possible alterations called by either you, the contracted, or them, the contractors). Also, you should take full/shared (depending on nature and circumstances) responsibility for incidents resulting from your involvement including but not limited to bugs.
Don't forget natural rules! Know your strength and limits, what you can and cannot do, your ethical, moral value and image, what is feasible and what is not; that gives you control, authority and earn you respect, whether you sign up or decline the offer.