removed exec-sync and added fs to do chmod work.