separated out file loading from main class