added writefile to send method for page creation