Information Freshness And Delay Optimization In Unreliable Wireless Systems