add pages action to show page counter
change to tempdir before processing