improved performance

'file' function was a bottleneck
set a auto_detect_line_endings directive to true