Add log statement to searchByID function