After you file

You can't contribute pre-tax dollars to an HSA after enrolling in Medicare Part A or Part B. This is because you can't have other health insurance than a HDHP to contribute pre-tax dollars to an HSA.