class RayTracer, fixed errore writting color to file