Completed error handling ,Just timestamp part left