used halt() for session not writable error