raised empty file exception, removed debugging statements