We consider a stochastic control problem with the assumption that the system is controlled until the state process breaks the fixed barrier. Assuming some general conditions, it is proved that the resulting Hamilton Jacobi Bellman equations has smooth solution. The aforementioned result is used to solve the optimal dividend and consumption problem. In the proof we use a fixed point type argument, with an operator which is based on the stochastic representation for a linear equation.