replaced tabs with spaces
write output to bot.log file
added getIP() function; minor changes