Fixed the issue where detect_spec.rb was generating an empty log file after each rspec test