Modify Documents controller to help debug.