Implementation of non-interactive mode