modified server for debugging, moved kq_create in device_open