added more error printing