Added loadfile function.