checking for directory exist before writing
change time unit name