security changes in getDocument function & add getDrive function