removed duplicate require
moved checkFileExists to utils
moved functions to utils