improved hot reload to cover the case in which the file gets deleted