Need to rewrite mediafilewriter as monolithic