fixed line and path handling in buffer util