Added check to see if variable mountpoint is undef