Improved folders writing