Improved input error handling on script execution