Correct error is thrown if file size is too large