Change function status to ap status, and add TIMEOUT