What would be the most appropriate measure I should take if I feel that I am failing to submit my MSc thesis within deadline?
The key question that you need to answer is "why".  

If there are serious, unforeseeable circumstances that have effected your ability to progress with your research and/or submit on time (such as illness),  then you should refer to your institution's policy and guidance on applying for an extension, mitigating circumstances etc.  Hopefully these will be considered and you will be granted an extension or a late submission will be accepted without penalty.

Some institutions also accept work-related circumstances as mitigating.

If it's down to poor planning, failing to adhere to your supervisor's advice or meet key milestones, bad luck etc, then, alas, it's unlikely that you will be granted any kind of dispensation to submit late.  Nonetheless, I'd advise you contact your supervisor to let them know the situation in the hope that they will help you unpick the situation.

In all circumstances, I'd suggest you talk to your supervisor as soon as possible or another adviser who might be able to help.

EDIT: Let this be a lesson to future readers - always ask for help sooner rather than later if you find yourself running into trouble and fear missing a deadline.  Two weeks before due date isn't going to cut it.