check for file existence in get-doc()