modified to read a static file under public directory