- Wrap installKey method in try-catch for better error handling - Execute checkRegistration=Apply after successful key download - Add error response for installation failures - Apply changes to both PHP class and shell script