error messages and upload api improved

Signed-off-by: Ondrej Rafaj <ondrej.rafaj@fuerteint.com>