dont use sudo
Added some isset checks