moved contents of info() function to class members
context manager now closes stream