Fixed runtime error on handling path for cloudconfig
ADDED testing mode and flags to change port