Added error code to compile csripts