Add reload middleware