write log to file, and show src IP