error returns just 1 instead of line num