XNAT-2935: Related, at least. Because the Properties.getProperty() method returns a string, "false" ends up evaluating to true in Velocity evaluation. You need to test the actual value.
Added check for .txt extension for text/plain media type.