fixed the preferences input file and added some logging