Added -g flag for setting application root