added optional lines parameter to filesource function
added inline docs for filesource