Added reader and adopted Loader to read from a file