add file type and size check