Load function used in main instead of loading files every 5 sec.