checking for empty file before sending results