added modified samples for lesson16 try-with-resources