Adding additional checks to script