sprite writer now also writes to a file