Adding additional check to script