fixed writing paths