Fixed Bug - overwriting output document if url points to named file