check code before committing