Change printstack to err.println