fix some bugs, oy variable scope, found file!