added compile command and exception handling