added a better timeStamp, fixed an IOExeption bug.