return if file is nil

related to #25
Merge pull request #35 from acrogenesis/patch-1

return if file is nil