Replaced all unportable puts and print with STDOUT.write in filters