move root_check_function to common.sh