load -lib before -core to ensure functions are available