How to avoid losing your job and facing middle-life crisis?