fixed stupid sampling bug, added line # limit per file