improved logging and prevent user error