fixed #64 by checking for empty file