fixed currentItem changed, fixed date check, write USERID/GOODSID to output file, added try-catch