passed var filename into some callback fns

added more alerts