read directly from file instead of buffer