fixed bug with file drag-drop
startupJavaScript now runs after loading a file at runtime.