More comprehensive loader hook example