added multipart support + errors