check connection socket object before calling close()
warn on duplicate folder and files