improve logic and error if missing process page