If it is shown that a defendant or The People shall be prejudiced by joining several offenses or defendants in a single information or complaint, or by joint trial, the court may order a separate trial of offenses or of defendants, or grant any other remedy proper at law.