Take photos of all the rooms and appliances in your apartment. If you eventually leave, the landlord may claim to be entitled to all or part of your security deposit, due to the condition the unit was left in. With pictures, you'll have the evidence necessary to substantiate a defense that any damage is no more than regular "wear and tear."
Ideally, you should take a set of photos before you move into any new residence. That way an original group of pictures can be compared to those showing the unit's condition when you leave, to create the best possible defense. Certainly though, if you don't have various photographic views from the time you moved in, take a series of shots before you leave. Include the current day's newspaper in the photos to validate the date that were actually taken.
Before you vacate, it's a good idea to review whether you were charged the appropriate security deposit in the first place. The maximum security deposit you can be charged on a rent-regulated apartment is one month's rent, but on an unregulated unit, there isn't a legal restriction on the amount a landlord can require for it. If your apartment is rent-stabilized and you were charged more than the legally allowable amount, it's an overcharge. In this circumstance, the landlord could be liable to you for triple damages, and is not entitled to apply the additional security deposit to any costs for damage or other debt.
Be careful about attempting to apply the security deposit to the remaining rent due at termination, as it is not legally considered to be rent. That means the landlord can sue you for the final amount of rent due. If the landlord wins the suit, you can also be subject to attorneys fees and interest. Once the security deposit has been released and applied to any remaining rent owed, or to other charges, any balance of arrears can go into a judgment. A court-ordered judgment imposes 9% interest annually and can ruin your credit rating.
Unfortunately, if the landlord doesn't accept your surrender of the apartment and claims that you still occupy the unit, you could end up in a Housing Court suit. If this happens, you'll be blacklisted once the case proceeds to trial. However, since landlords refuse to pay the security back in many instances, using it for your last month's rent can be a way to retrieve it. You'll have to weigh the risk based on your relationship with the landlord, and the position he or she takes on your intent to use the security deposit for rent.