Add better error handling in initial app setup