Added check for Permission before opening GUI