fixed var names into snake style.
added check to see if file exists.