example program for context manager using 'with' statement