add debug to photo gallery