added code to validate chunk size cannot be greater than file size