fix page number check
and parens in (if) trying to rename the file twice