Wrong size input

This problem causes wrong error message when `maxsize` exceed, it shows the file size instead of `maxsize`.