check rules and others

changes:
1. check rules
2. change access log's level to debug
3. reformat code
sorry for reformatted code