add writepsf