Try to close serial connection