Getting detailed error from sql script

Hello,

I have a main.sql file which runs around 5-6 .sql files and each .sql file is spooling it in separate text file.

In my shell script I am appending main.sql to one of my log file but I am not able to get detailed error if anything fails from those 5-6 .sql files. Those errors are going to corresponding text file. How Can I get the detail error in my .log file??
Shell script code is as follows:

sqlplus -s db/abc@hostname /main.sql >> /sample.log

main.sql is as follows:

WHENEVER SQLERROR EXIT.SQLCODE
PROMPT 1.sql is running
@/1.sql
set termout on
PROMPT 2.sql is running
@2.sql
set termout on

Try redirecting stderr to stdout:

sqlplus .... >> logfile 2>&1