functionality for creating pagefile