copy of utils and exception from app_manager