Better error reportage and fixed file reloading.