If you hold your position until the end of the transaction and enter the delivery procedure without performing the delivery procedure, you will be fined by the exchange, which may be higher than the amount you perform the delivery procedure, so you'd better close your position before delivery.
If your margin is not enough to maintain the position and enter the delivery, the futures company will forcibly close the position and will not let you enter the delivery process under the condition of insufficient funds.