code to extract ip from log files