fixed paths for picture and thumb deletion
fixed errorhandling