added error log
fixed routes