Fixed the creation of directories
Ensure finer resolution is possible