Addded some validations to scripts