Slightly changed the timing of the SimpleURLRegistryTest to avoid failure due to clock issues. Improved the file write method in the test case to flush the stream before closing.