move api limit behind conditional log