The man has since been released from custody and is due in court next week