Fix check_running_under_supervisor

Move all needed check to command ``check_running_under_supervisor`` for easy understanding and decreasing code lines.