added support for file:// protocol and fixed tests