adding fdclose event. closes #5