added factory method to read properties from the classpath.