Moved credentials file creation lower - fixed an issue with aborting the script on code input - rendered script unusable unless (empty) credentials file was deleted manually