Conditional main func for libLoading