second iteration of log http, including actually writing to log file