add file size check mechanism