update documents snippet to use firstObject method and to provide an appropriate NSURL