added null check for filename and updated first entry in xml from 'config' to 'configuration'
simple reformating
moved variable into the try catch block