Deploying resource properly from GridFS