writing first error script