Writing to log file for TestDetection( ) unit test