refine code

1. define debug log
2. remove 3 digit limit in content search