printing wrong err