Removed all temp files and date logic fixed