add file size check, add doc