Moved code change event handler for #file into closure