Add response timeout function