fixed line and path handling in file helpers