fix for hanging on empty output file
fix for hanging on empty output file

simonvh/gimmemotifs,simonvh/gimmemotifs,simonvh/gimmemotifs,simonvh/gimmemotifs,simonvh/gimmemotifs,simonvh/gimmemotifs,simonvh/gimmemotifs