Fix Pagefiles issue and switch unlink() to Pagefile->unlink()