add defensive check for file_size in field definition