error handling and initialization order