Added close on timeout