Fix for blank files getting created