function to create slot file