add statuschanged event
move file loading from ui
check source before firing
use jshint