Added the ability to specify the output device.
Fixed: Don't crash on invalid or non-existent file.