added auto file load code