Added server-rec thread