return when file is null or stream
Merge pull request #1 from popomore/master

return when file is null or stream