delete query string and write to file for testing