Added error handling and input validation