added thumbnail debug
added debug to run off envvar
added alert messages;
made spacing slightly better