Fix FileWriter.write to always return true or false (not undefined).
redo fix to FileWriter.write to only check the queue length if ret is false