Refactored verify context method. TODO: update logger to use full line details & testing.