Added logging before restrict