Added root permission check