Add support for receiving files without looping
Fix warning message in Ruby 1.8