How Do I Encrypt and Decrypt a file from Disk rather than doing that from memory? : [enter image description here][1]::

When I am trying to encrypt and decrypt a 250MB file y=using AES algorithm, I am getting the following error. When I am trying with datasets less than 250, I am able to get the output.

  [1]: https://i.stack.imgur.com/YsPBn.png