Bug fixes

Changed the execWithLog method;
Change the permissions upon directory creation.