initializing file for parsing results
wrapping network stats in a function