write profile script