* Fix broken when no commits and default branch is not master * Fix IsEmpty check * Improve codes * Add timeout