pasim: catch loader errors with specific error messages, do proper cleanup